{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "3af2b454",
   "metadata": {},
   "source": [
    "1【简答题】练习 3-02：\n",
    "\n",
    "寻找这样的两位数，使得将它进行平方后，将产生 1 个三位数，而这个三位数最右边的两个数字与原来的 2 位数字相同。 (6.0 分)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "dff5966b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The special number is: 25\n"
     ]
    }
   ],
   "source": [
    "def is_special_number(n2):\n",
    "    n3 = n2 ** 2\n",
    "\n",
    "    if 100 <= n3 <= 999:\n",
    "        last_2_digits = n3 % 100\n",
    "\n",
    "        if last_2_digits == n2:\n",
    "            return True\n",
    "\n",
    "    return False\n",
    "\n",
    "for i in range(10, 100):\n",
    "    if is_special_number(i):\n",
    "        print(f\"The special number is: {i}\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
